home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
midifi1a
/
form1.frm
next >
Wrap
Text File
|
1999-10-02
|
2KB
|
85 lines
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Object = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.OCX"
Begin VB.Form Form1
Caption = "Midi Player."
ClientHeight = 4410
ClientLeft = 60
ClientTop = 345
ClientWidth = 8565
LinkTopic = "Form1"
ScaleHeight = 4410
ScaleWidth = 8565
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 10
Left = 7470
Top = 855
End
Begin VB.ListBox List1
Height = 3960
Left = 0
TabIndex = 2
Top = 0
Width = 6765
End
Begin MCI.MMControl MMControl1
Height = 510
Left = 6795
TabIndex = 1
Top = 3465
Width = 1695
_ExtentX = 2990
_ExtentY = 900
_Version = 327680
PrevVisible = 0 'False
NextVisible = 0 'False
BackVisible = 0 'False
StepVisible = 0 'False
RecordVisible = 0 'False
EjectVisible = 0 'False
DeviceType = "Sequencer"
FileName = ""
End
Begin ComctlLib.ProgressBar ProgressBar1
Height = 330
Left = 0
TabIndex = 0
Top = 4050
Width = 8520
_ExtentX = 15028
_ExtentY = 582
_Version = 327682
Appearance = 1
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub PlayMusic(filename As String)
Timer1.Enabled = False
MMControl1.Command = "Stop"
MMControl1.Command = "Close"
MMControl1.filename = filename
MMControl1.Command = "Open"
MMControl1.Command = "Play"
Timer1.Enabled = True
End Sub
Private Sub Form_Unload(Cancel As Integer)
MMControl1.Command = "Stop"
MMControl1.Command = "Close"
End Sub
Private Sub List1_Click()
PlayMusic List1.Text
End Sub
Private Sub Timer1_Timer()
ProgressBar1.Max = MMControl1.Length
ProgressBar1.Value = MMControl1.Position
End Sub